package LiuLiangPre;

import java.util.Date;

public class Student {
    private String id;
    private String date;
    private float value;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date;
    }

    public float getValue() {
        return value;
    }

    public void setValue(float value) {
        this.value = value;
    }

    @Override
    public String toString() {
        return "Student{" +
                "id=" + id +
                ", date=" + date +
                ", value=" + value +
                '}';
    }

    public Student(String id, String date, float value) {
        this.id = id;
        this.date = date;
        this.value = value;
    }

    public Student(String id, String date) {
        this.id = id;
        this.date = date;
    }

    public Student(String id) {
        this.id = id;
    }
    public Student() {

    }


    @Override
    public boolean equals(Object obj) {
        if(obj==null){
            return false;
        }
        if(this==obj){
            return true;
        }
        if(obj instanceof Student){
            Student dog=(Student)obj;
            if(dog.id==this.id&&dog.id.equals(this.id)){
                return true;
            }else{
                return false;
            }
        }
        return false;
    }
}
